package com.yamin.picToCharPaint.controller;

import com.yamin.picToCharPaint.service.ImageService;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

/**
 * @description:
 * @author：yamin
 * @date: 2021/9/15
 */
@RestController
@RequestMapping("/image")
public class ImageController {

    @Resource
    private ImageService imageService;

    @PostMapping("/invertImg")
    public String invert(@RequestBody MultipartFile file, @RequestParam Integer precision) {
        imageService.invertImg(file, precision);
        return "转换完成";
    }
}
